#include <linux/pci.h>
#include <linux/irq.h>
#include <linux/log2.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/slab.h>
#include <linux/dmi.h>
#include <linux/platform_device.h>
#include <linux/usb.h>
#include <linux/usb/hcd.h>
#include <linux/usb/otg.h>
#include <linux/usb/dwc_otg3.h>
#include <linux/types.h>
#include "xhci_ts.h"


int	xhci_reset(struct usb_hcd *hcd)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
int	xhci_start(struct usb_hcd *hcd)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
int	xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
int	xhci_pci_resume(struct usb_hcd *hcd, bool hibernated)
{
	printk("zoucao %s\n", __func__);
}

void xhci_stop (struct usb_hcd *hcd)
{
	printk("zoucao %s\n", __func__);
}

void xhci_shutdown (struct usb_hcd *hcd)
{
	printk("zoucao %s\n", __func__);
}
int	xhci_get_frame_number (struct usb_hcd *hcd)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
int	xhci_urb_enqueue(struct usb_hcd *hcd,struct urb *urb, gfp_t mem_flags)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
int	xhci_urb_dequeue(struct usb_hcd *hcd,struct urb *urb, int status)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
int	xhci_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb,gfp_t mem_flags)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
void xhci_unmap_urb_for_dma(struct usb_hcd *hcd, struct urb *urb)
{
	printk("zoucao %s\n", __func__);
}
void xhci_endpoint_disable(struct usb_hcd *hcd,struct usb_host_endpoint *ep)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
void xhci_endpoint_reset(struct usb_hcd *hcd,struct usb_host_endpoint *ep)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
int	xhci_hub_status_data (struct usb_hcd *hcd, char *buf)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
int	xhci_hub_control (struct usb_hcd *hcd,u16 typeReq, u16 wValue, u16 wIndex,char *buf, u16 wLength)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
int	xhci_bus_suspend(struct usb_hcd *hcd)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
int	xhci_bus_resume(struct usb_hcd *hcd)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
int	xhci_start_port_reset(struct usb_hcd *hcd, unsigned port_num)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
void xhci_relinquish_port(struct usb_hcd *hcd, int)
{
	printk("zoucao %s\n", __func__);
}
int	xhci_port_handed_over(struct usb_hcd *hcd, int)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
void xhci_clear_tt_buffer_complete(struct usb_hcd *hcd,struct usb_host_endpoint *ep)
{
	printk("zoucao %s\n", __func__);
}
int	xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *usb)
{
	printk("zoucao %s\n", __func__);
}
void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *usb)
{
	printk("zoucao %s\n", __func__);
}
int	xhci_alloc_streams(struct usb_hcd *hcd, struct usb_device *udev,struct usb_host_endpoint **eps, unsigned int num_eps,unsigned int num_streams, gfp_t mem_flags)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
int	xhci_free_streams(struct usb_hcd *hcd, struct usb_device *udev,struct usb_host_endpoint **eps, unsigned int num_eps,gfp_t mem_flags)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
int	xhci_add_endpoint(struct usb_hcd *hcd, struct usb_device *usb,struct usb_host_endpoint *ep)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
int	(*drop_endpoint)(struct usb_hcd *hcd, struct usb_device *usb,
				xhci_struct usb_host_endpoint *ep)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
int	xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *usb)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
int	xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
int	xhci_update_hub_device(struct usb_hcd *hcd, struct usb_device *hdev,struct usb_tt *tt, gfp_t mem_flags)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
int	xhci_reset_device(struct usb_hcd *hcd, struct usb_device *usb)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
int	xhci_update_device(struct usb_hcd *hcd, struct usb_device *usb)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
#ifdef CONFIG_USB_OTG
int	xhci_start_host (struct usb_hcd *hcd)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
int	xhci_stop_host (struct usb_hcd *hcd)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
int	xhci_reset_port (struct usb_hcd *hcd)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
int	xhci_release_host (struct usb_hcd *hcd)
{
	printk("zoucao %s\n", __func__);
	return 0;
}
#endif


static const struct hc_driver xhci_plat_hc_driver = {
	.description =		hcd_name,
	.product_desc =		"xHCI Host Controller",
	.hcd_priv_size =	sizeof(struct xhci_hcd *),
	.irq =			xhci_irq,
	.flags =		HCD_MEMORY | HCD_USB3 | HCD_SHARED,
	/*
	 * basic lifecycle operations
	 */
	.reset =		dwc_host_setup,
	.start =		xhci_run,
	.stop =			xhci_stop,
	.shutdown =		xhci_shutdown,
	/*
	 * managing i/o requests and associated device resources
	 */
	.urb_enqueue =		xhci_urb_enqueue,
	.urb_dequeue =		xhci_urb_dequeue,
	.alloc_dev =		xhci_alloc_dev,
	.free_dev =		xhci_free_dev,
	.alloc_streams =	xhci_alloc_streams,
	.free_streams =		xhci_free_streams,
	.add_endpoint =		xhci_add_endpoint,
	.drop_endpoint =	xhci_drop_endpoint,
	.endpoint_reset =	xhci_endpoint_reset,
	.check_bandwidth =	xhci_check_bandwidth,
	.reset_bandwidth =	xhci_reset_bandwidth,
	.address_device =	xhci_address_device,
	.update_hub_device =	xhci_update_hub_device,
	.reset_device =		xhci_discover_or_reset_device,

	/*
	 * scheduling support
	 */
	.get_frame_number =	xhci_get_frame,
	/* Root hub support */
	.hub_control =		xhci_hub_control,
	.hub_status_data =	xhci_hub_status_data,
	.bus_suspend =		xhci_dwc_bus_suspend,
	.bus_resume =		xhci_dwc_bus_resume,

	.start_host = xhci_start_host,
	.stop_host = xhci_stop_host,
	.reset_port = xhci_reset_port,
	.release_host = xhci_release_host,
};
